import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
import Home from '@/views/home.vue'
import Vichdraw from '@/views/vichdraw/index.vue'
import Uwb from '@/views/uwb/index.vue'

const routes: Array<RouteRecordRaw> = [
  { path: '/', redirect: '/vichdraw' },
  {
    path: '/',
    name: 'home',
    component: Home,
    children: [
      {
        path: '/',
        name: 'vichdraw',
        component: Vichdraw
      },
      {
        path: '/vichdraw',
        name: 'vichdraw',
        component: Vichdraw
      },
      {
        path: '/uwb',
        name: 'uwb',
        component: Uwb
      }
    ]
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
